function shu(num) {
    if (num <= 1) {
        return '不是素数';
    }
    
    for (let i = 2; i <= Math.sqrt(num); i++) {
        if (num % i === 0) {
            return '不是素数';
        }
    }
    
    return '素数';
}
console.log(shu(1)); 
console.log(shu(10)); 
console.log(shu(17)); 
